﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;
    using UnityEngineInternal;

    public sealed class AssetBundle : UnityEngine.Object
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern bool Contains(string name);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern AssetBundle CreateFromFile(string path);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern AssetBundleCreateRequest CreateFromMemory(byte[] binary);
        public UnityEngine.Object Load(string name)
        {
            return this.Load(name, typeof(UnityEngine.Object));
        }

        [MethodImpl(MethodImplOptions.InternalCall), TypeInferenceRule(TypeInferenceRules.TypeReferencedBySecondArgument), WrapperlessIcall]
        public extern UnityEngine.Object Load(string name, System.Type type);
        public UnityEngine.Object[] LoadAll()
        {
            return this.LoadAll(typeof(UnityEngine.Object));
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern UnityEngine.Object[] LoadAll(System.Type type);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern AssetBundleRequest LoadAsync(string name, System.Type type);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void Unload(bool unloadAllLoadedObjects);

        public UnityEngine.Object mainAsset { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }
    }
}

